package org.example.mallchat.common.event;

import lombok.Getter;
import org.example.mallchat.domain.entity.User;
import org.springframework.context.ApplicationEvent;

/**
 * @author: zzh
 * @date: 2024/12/24 13:30:49
 * @version: 1.0
 */
//用户上线事件
@Getter
public class UserOnlineEvent extends ApplicationEvent {
    private final User user;

    /**
     * UserRegisterEvent构造函数
     * @param source 事件源 一般用类本身this
     * @param user
     */
    public UserOnlineEvent(Object source, User user) {
        super(source);
        this.user = user;
    }
}
